home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / PttyConnection.h < prev    next >
C/C++ Source or Header  |  1992-04-27  |  999b  |  46 lines

  1. #ifndef PttyConnection_First
  2. #ifdef __GNUG__
  3. //pragma once
  4. #pragma interface
  5. #endif
  6. #define PttyConnection_First
  7.  
  8. #include "Types.h"
  9.  
  10. //---- abstract class for a connection with a pseudo tty ---------------------
  11.  
  12. struct PttyChars { // struct to return the settings of the various tty characters
  13.     char erase;
  14.     char kill;
  15.     char rprnt;
  16.     char susp;
  17.     char intr;
  18.     char quit;
  19.     char eof;
  20. };
  21.  
  22. class PttyConnection {
  23. #ifdef __GNUG__
  24.     char *dummy;
  25. #endif
  26. protected:
  27.     PttyConnection();
  28. public:
  29.     virtual ~PttyConnection();
  30.     virtual FILE *GetFile();
  31.     virtual int GetPid();
  32.     virtual int GetFileNo();
  33.     virtual bool SubmitToSlave(char *buf, int n);
  34.     virtual int Read(char *buf, int size);
  35.     virtual int GetMode();
  36.     virtual void KillChild();
  37.     virtual void CleanupPtty();
  38.     virtual bool Echo();
  39.     virtual bool RawOrCBreak();
  40.     virtual void BecomeConsole();
  41.     virtual void SetSize(int rows, int cols);
  42.     virtual void GetPttyChars(PttyChars *);
  43. };
  44.  
  45. #endif
  46.